using System.Collections.Generic;

namespace TeamTasker.Utils
{
    /// <summary>
    /// Represents utils methods for Arrays.
    /// </summary>
    public class ArrayUtils
    {
        public static bool IsEmpty(int[] arr)
        {
            return (arr == null || arr.Length == 0);
        }

        public static bool IsNotEmpty(int[] arr)
        {
            return !IsEmpty(arr);
        }

        public static bool IsEmpty(string[] arr)
        {
            return (arr == null || arr.Length == 0);
        }

        public static bool IsNotEmpty(string[] arr)
        {
            return !IsEmpty(arr);
        }

        public static bool IsEmpty(object[] arr)
        {
            return (arr == null || arr.Length == 0);
        }

        public static bool IsNotEmpty(object[] arr)
        {
            return !IsEmpty(arr);
        }

        public static IList<int> ToList(int[] arr)
        {
            return new List<int>(arr);
        }

        public static IList<string> ToList(string[] arr)
        {
            return new List<string>(arr);
        }
    }
}